test(e2e): fix stale bootstrap call-count assertions left by #117 - #124
Merged
Conversation
PR #117 (issue #109) changed session_bootstrap to fan out the semantic count over both the project and general namespaces, taking the ListMemoryRecords call count from 3 to 4. It updated the unit test in test_agentcore_unit.py but missed the hard-coded counts in the J2 journey test, leaving main red. The 4-call shape is the intended behaviour, so this updates the stale assertions rather than the code: total calls 3 -> 4, and the semantic leg 1 -> 2 (project + general). The episodic leg stays at 2. CI did not catch this because no workflow runs tests/e2e -- only bugbot, docs, typecheck and ui-tests. Worth a follow-up. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
There was a problem hiding this comment.
🟢 Claude BugBot Analysis
This diff only updates test assertions in test_agentcore_journey.py to expect 4 ListMemoryRecords calls (2 episodic + 2 semantic) instead of 3. Verified against the actual session_bootstrap implementation in better_memory/storage/agentcore.py, which fans out semantic queries over both the project and general namespaces — the updated counts and comment accurately reflect that behavior, so no bug was found in the changed lines.
No bugs were detected in this PR.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
mainis currently red.tests/e2e/test_agentcore_journey.py::test_j2_session_bootstrap_hook_reaches_agentcorefails withassert 4 == 3.Cause
PR #117 (issue #109) changed
session_bootstrapto fan out the semantic count over both the project and general namespaces, soListMemoryRecordsgoes from 3 calls to 4. That PR correctly updated its unit test (test_session_bootstrap_fires_3_parallel_list_calls→..._4_...) but missed the hard-coded counts in the J2 journey test.The 4-call shape is the intended behaviour, so this updates the stale assertions rather than reverting the code:
len(lists)len(fake.requests)EPI-FAKE-0001)SEM-FAKE-0001)Why CI missed it
No workflow runs
tests/e2e— the set is bugbot, docs, typecheck and ui-tests. All three checks on #117 were green and it merged with main left broken. The break only surfaced on a full local run.Worth a follow-up: either add an e2e job, or accept that call-count changes need a manual
tests/e2egrep. Happy to open a separate issue.Verification
tests/e2e/test_agentcore_journey.py— 8 passedtests/e2e(full) — 72 passed, 5 skippedTest-only change; no production code touched.
🤖 Generated with Claude Code